import React from 'react';

import render from '../../../../../hrpub/common/frame/render';

import TrnsRefer from '../../../../../hrhi/refer/hiref/TrnsTypeGridRef/index';

import HeaderAction from './headerAction';

import './index.less'

import { base } from 'nc-lightapp-front';

let { NCSelect, NCRow, NCCol, NCCheckbox, NCButton, NCSwitch, NCMenu,NCItem, NCIcon } = base;

let NCOption = NCSelect.NCOption;

export default render({
    actions: {
        header: HeaderAction
    },
    state: {
        flag:true
    }
})(({props, action, state}) => {
    const { button } = props;
    let { createButtonApp } = button; 
    return (
        <header className="nc-bill-header-area">
            <div className="search fl">
                <TrnsRefer
                    disabled = {!props.buttonFlag}
                    className = "selectTrial"
                    onChange = {action.header.handleChangePeople}
                    value = {props.orgValue}
                    placeholder = {props.json['gx6008-000034']} //调配业务类型
                    refName = {props.json['gx6008-000034']}
                    queryCondition = {action.header.paramData}
                />

            </div>

            <div className="fr">
                {props.dateFlag === true?(createButtonApp({area:'head_action',onButtonClick: action.header.buttonVisible})):null}
            </div>
        </header>
    );

});